package com.wanxi.dao;

import com.sun.org.apache.regexp.internal.RE;
import com.wanxi.model.ProductModel;

import java.util.ArrayList;
import java.util.List;

public class ProductDao {
    public List<ProductModel> getHomeProductData() {
        List<ProductModel> list = new ArrayList<>();
        String[] imgs = {"../img/21_ttlm.jpg", "../img/21_ttlm.jpg"};
        String[] names = {"红烧狮子头", "红烧狮子头"};
        String[] contents = {"狮子头，油盐酱醋", "狮子头，油盐酱醋"};
        for (int i = 0; i < imgs.length; i++) {
            list.add(ProductModel.builder()
                    .name(names[i])
                    .img(imgs[i])
                    .content(contents[i])
                    .build());
        }
        return list;
    }

    public List<ProductModel> getCompanyProductData() {
        List<ProductModel> list = new ArrayList<>();
        String[] imgs = {"../img/21_ttlm.jpg", "../img/21_ttlm.jpg"};
        String[] names = {"红烧狮子头", "红烧狮子头"};
        String[] contents = {"狮子头，油盐酱醋", "狮子头，油盐酱醋"};
        for (int i = 0; i < imgs.length; i++) {
            list.add(ProductModel.builder()
                    .name(names[i])
                    .img(imgs[i])
                    .content(contents[i])
                    .build());
        }
        return list;
    }
}
